import Vue from 'vue'
import VueRouter from 'vue-router'
import Login from "../components/user/Login";
import IndexHome from "../components/index/IndexHome"; //引入Login组件
import MainContent from "../components/index/MainContent";
import Index from "../components/index/Index";
import News from "../components/news/News";
import Assessment from "../components/assessment/Assessment";
import Regulations from "../components/regulations/Regulations";
import Law from "../components/regulations/Law";
import Thammasat from "@/components/regulations/Thammasat";
import Departmental from "@/components/regulations/Departmental";
import LocalNGovernment from "@/components/regulations/LocalNGovernment";
import Main from "../components/medicalService/Main";
import FamousHospital from "../components/medicalService/FamousHospital";
import FamousSpeciality from "../components/medicalService/FamousSpeciality";
import FamousDoctor from "../components/medicalService/FamousDoctor";
import Notice from "../components/notice/Notice";
import NoticeDetail from '../components/notice/NoticeDetail'
import Industry_Development from '../components/industry_development/IndustryDevelopment'

import Register from "../components/user/Register";
import Menu from "../components/health_care/Menu";
import Left from "../components/industry_development/Left";
import Resource from "../components/industry_development/Resource";
import Scientific from "../components/industry_development/Scientific";
import Cooperation from "../components/industry_development/Cooperation";
import Recruit from "../components/industry_development/Recruit";
Vue.use(VueRouter)

const routes = [
  {
    path:"/",
    redirect:"/IndexHome"
  },
  {
    path:"/login",
    component:Login
  },
  {
    path:"/register",
    component:Register
  },

  {
    path: '/noticeDetail',
    component: NoticeDetail
  },

  {
    path:"/indexHome",
    component:IndexHome,
    redirect: '/main',
    children:[
      {
        path: '/main',
        name: 'MainContent',
        component: MainContent,
        children:[
          {
            path: '/main/index',
            component: Index
          },
          {
            path: '/main/news',
            component: News
          },

          {
            path: '/main/notice',
            component: Notice
          },

          {
            //产业发展
            path:'/main/industry_development',
            name:'Industry_Development',
            component:Industry_Development,
            children:[
              {
                path:'/main/industry_development/Left',
                component:Left
              },
              {
                path:'/main/industry_development/Resource',
                component:Resource
              },
              {
                path:'/main/industry_development/Scientific',
                component:Scientific
              },
              {
                path:'/main/industry_development/Cooperation',
                component:Cooperation
              },
              {
                path:'/main/industry_development/Recruit',
                component:Recruit
              },
            ]
          },

          {
            path:'/main/assessment',
            component:Assessment
          },
          {
            path:'/main/regulations',
            name:Regulations,
            component:Regulations,
            children:[
              {
                path: '/main/law',
                component: Law
              },
              {
                path: '/main/thammasat',
                component: Thammasat
              },
              {
                path: '/main/departmental',
                component: Departmental
              },
              {
                path: '/main/LocalNGovernment',
                component: LocalNGovernment
              }]
              },

              {
                //医疗服务
                path: '/main/medicalService',
                component: Main,
                children: [
                  {
                    path: '/main/medicalService/famousHospital',
                    component: FamousHospital
                  },
                  {
                    path: '/main/medicalService/famousSpeciality',
                    component: FamousSpeciality
                  },
                  {
                    path: '/main/medicalService/famousDoctor',
                    component: FamousDoctor
                  }
                  ]
          },
            ]
      },
      {
        path: '/main/menu',
        component: Menu
      }
    ]
  }

  ]
const router = new VueRouter({
  routes
})

export default router
